Estimating rainfall precipitation amounts by applying computer vision in cameras

ABSTRACT

A method and system are provided. The method includes storing a set of references images without rain and spanning a plurality of different light conditions. The method further includes capturing, using a camera, an image of a scene with rain. The method also includes selecting a reference image from the set of reference images based on the light condition of the captured image. The method additionally includes performing an arithmetic subtraction image processing operation between the captured image and the reference image to generate a subtraction image. The method further includes estimating an amount of rain in the subtraction image based on previously calibrated values.

BACKGROUND

Technical Field

The present invention relates generally to information capture and, inparticular, to estimating rainfall precipitation amounts by applyingcomputer vision in cameras.

Description of the Related Art

The influence of weather and climatic events are extremely important invirtually all contexts and businesses. All sorts of companies, no matterwhat they produce, can be affected somehow by weather events.Agriculture, the stock market, insurance, energy generation anddistribution, road traffic, airports (flight control, ground operations,and logistics), city operations on the imminence of natural disasters,among many other situations and contexts, would be affected by weatherevents, but mainly in “extreme weather events”. Due to these reasons,cities, companies and weather agencies must be well instrumented in sucha way they could predict, act, operate, implement recovery plans, and soon.

Nowadays, rain gauges are very important devices that allow betterdecision making for all sorts of cities operations and businesses. It issomewhat common to find rain gauges or full weather stations installedin some places, but never in a sufficient amount to cover the entirecity (spatially-wise), irrespective of risky areas.

In addition to that, the coverage of these sensors is far from adequateto be assimilated by numerical models (as initial and boundaryconditions). These numerical models can be weather forecast models,flood predictions, air quality analysis and forecast, drought forecastand analysis, besides other purposes.

SUMMARY

According to an aspect of the present principles, a method is provided.The method includes storing a set of references images without rain andspanning a plurality of different light conditions. The method furtherincludes capturing, using a camera, an image of a scene with rain. Themethod also includes selecting a reference image from the set ofreference images based on the light condition of the captured image. Themethod additionally includes performing an arithmetic subtraction imageprocessing operation between the captured image and the reference imageto generate a subtraction image. The method further includes estimatingan amount of rain in the subtraction image based on previouslycalibrated values.

According to another aspect of the present principles, a system isprovided. The system includes a storage device for storing a set ofreferences images without rain and spanning a plurality of differentlight conditions. The system further includes a camera for capturing animage of a scene with rain. The system also includes an image selectorfor selecting a reference image from the set of reference images basedon the light condition of the captured image. The system additionallyincludes an image subtractor for performing an arithmetic subtractionimage processing operation between the captured image and the referenceimage to generate a subtraction image. The system further includes arain estimator for estimating an amount of rain in the subtraction imagebased on previously calibrated values.

These and other features and advantages will become apparent from thefollowing detailed description of illustrative embodiments thereof,which is to be read in connection with the accompanying drawings.

BRIEF DESCRIPTION OF DRAWINGS

The disclosure will provide details in the following description ofpreferred embodiments with reference to the following figures wherein:

FIG. 1 shows an exemplary processing system 100 to which the presentprinciples may be applied, in accordance with an embodiment of thepresent principles;

FIG. 2 shows an exemplary system 200 for estimating rainfallprecipitation amounts, in accordance with an embodiment of the presentprinciples; and

FIG. 3 shows an exemplary method 300 for estimating rainfallprecipitation amounts, in accordance with an embodiment of the presentprinciples.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

The present principles are directed to estimating rainfall precipitationamounts by applying computer vision in cameras. In an embodiment, thepresent principles turn regular cameras into rain gauges. As usedherein, the term “regular camera” refers to a camera not originallyconfigured or designed to operate as a rain gauge.

Hence, in an embodiment, the present principles assume that regularcameras can be used for more than just surveillance or trafficmonitoring. Hence, in an embodiment, regular video or still cameras canbe used to estimate the quantity of precipitation.

In an embodiment, we use computer vision to estimate precipitationamount. An advantage of using computer vision algorithms to processrainfall in regular cameras is that these cameras are wide spread due tolow cost as well the existence of such cameras for other purposes likesecurity, surveillance, and traffic monitoring, among others. Many timesthese cameras already exist and they are planned to be installed aroundthe cities to address other issues. Since the images are being generatedand sometimes they are also stored, they can be “easily” used for thisnew purpose as well. Hence, significant advantages of the presentprinciples include low cost of implementation, ease of connectivity, andlow computational requirements since the present principles can be basedon computer vision algorithms.

Advantageously, the present principles address the problem of lack ofweather instruments and reduce the whole “coverage” problem of rainsensors. While full-coverage may not always be possible, the coverageproblem can be addressed by installing as many sensors as possible in agiven area, coupled with mathematical algorithms to estimateprecipitation at several points).

Advantageously, in an embodiment, the present principles can “learn”from previous training and the correct registration of thresholds.Moreover, in an embodiment, the present principles can raise alerts asneeded. These and many other attendant advantages of the presentprinciples are readily determined by one of ordinary skill in the artgiven the teachings of the present principles provided herein.

FIG. 1 shows an exemplary processing system 100 to which the presentprinciples may be applied, in accordance with an embodiment of thepresent principles. The processing system 100 includes at least oneprocessor (CPU) 104 operatively coupled to other components via a systembus 102. A cache 106, a Read Only Memory (ROM) 108, a Random AccessMemory (RAM) 110, an input/output (I/O) adapter 120, a sound adapter130, a network adapter 140, a user interface adapter 150, and a displayadapter 160, are operatively coupled to the system bus 102.

A first storage device 122, a second storage device 124, and a camera177 are operatively coupled to system bus 102 by the I/O adapter 120.The storage devices 122 and 124 can be any of a disk storage device(e.g., a magnetic or optical disk storage device), a solid statemagnetic device, and so forth. The storage devices 122 and 124 can bethe same type of storage device or different types of storage devices.

A speaker 132 is operatively coupled to system bus 102 by the soundadapter 130. A transceiver 142 is operatively coupled to system bus 102by network adapter 140. A display device 162 is operatively coupled tosystem bus 102 by display adapter 160.

A first user input device 152, a second user input device 154, and athird user input device 156 are operatively coupled to system bus 102 byuser interface adapter 150. The user input devices 152, 154, and 156 canbe any of a keyboard, a mouse, a keypad, an image capture device, amotion sensing device, a microphone, a device incorporating thefunctionality of at least two of the preceding devices, and so forth. Ofcourse, other types of input devices can also be used, while maintainingthe spirit of the present principles. The user input devices 152, 154,and 156 can be the same type of user input device or different types ofuser input devices. The user input devices 152, 154, and 156 are used toinput and output information to and from system 100.

Of course, the processing system 100 may also include other elements(not shown), as readily contemplated by one of skill in the art, as wellas omit certain elements. For example, various other input devicesand/or output devices can be included in processing system 100,depending upon the particular implementation of the same, as readilyunderstood by one of ordinary skill in the art. For example, varioustypes of wireless and/or wired input and/or output devices can be used.Moreover, additional processors, controllers, memories, and so forth, invarious configurations can also be utilized as readily appreciated byone of ordinary skill in the art. These and other variations of theprocessing system 100 are readily contemplated by one of ordinary skillin the art given the teachings of the present principles providedherein.

Moreover, it is to be appreciated that system 200 described below withrespect to FIG. 2 is a system for implementing respective embodiments ofthe present principles. Part or all of processing system 100 may beimplemented in one or more of the elements of system 200.

Further, it is to be appreciated that processing system 100 may performat least part of the method described herein including, for example, atleast part of method 300 of FIG. 3. Similarly, part or all of system 200may be used to perform at least part of method 300 of FIG. 3.

FIG. 2 shows an exemplary system 200 for estimating rainfallprecipitation amounts, in accordance with an embodiment of the presentprinciples.

The system 200 includes a storage device 210, a camera 220, a lightcondition based image selector 230, an image background subtractor 240,an image border detection processor 250, a corner pixel cut-off device260, a threshold filter 270, a pixel counter 280, a rain estimator 290,and a rain indicator 299.

The storage device 210 is for storing a set of images to be used asbackground reference.

The camera 220 is for capturing images (e.g., still images and/or video)to be used to determine the amount of precipitation. While one camera isshown in FIG. 2 for the sake of simplicity, it is to be appreciated thatone or more cameras can be used in accordance with the teachings of thepresent principles. Preferably, many cameras are used in a given area inorder to overcome the aforementioned coverage problem. In an embodiment,the camera 220 is also used to determine the current light condition,that is, the light condition of a captured image. In another embodiment,another source other than the camera 220 can be used to determine thecurrent light condition. In an embodiment, the other source can include,but is not limited to, a new source such as the radio, printed media,digital media, and so forth.

The light condition based image selector 230 selects at least one of theimages from the set that best matches the light condition of thecaptured image in which rain amount is to be detected.

The image background subtractor 240 performs an image backgroundsubtraction operation between an image captured by the camera 220 and areference image stored in the storage device 210. The resultant image(hereinafter “subtraction image”) can be analyzed to determineprecipitation amount.

The border detection image processor 250 processes a result of thesubtraction performed by the image background subtractor 240 (the“subtraction image”). In an embodiment, the border detection imageprocessor 250 includes a Fourier transformer or wavelet transformer(collectively denoted by the reference numeral 251, and interchangeablyreferred to herein as “Fourier or wavelet transformer”), a borderdetector 252, and a line detector 253.

The Fourier or wavelet transformer 251 performs a Fourier (or equivalentwavelet) transform on the subtraction image to identify/enhancefrequencies which describe the texture of raindrops.

The border detector 252 detects borders in the subtraction image. Theborder detector 252 can be and/or otherwise involve one or more of thefollowing filters/filtering operations: Laplacian; difference ofGaussians; edge detector (e.g., Canny edge detector); Sobel; and soforth.

The line detector 253 detects lines of a certain orientation(s) in thesubtraction image. In an embodiment, the line detector 253 includes alinear Hough transformer 253A and a circular Hough transformer 253B.However, it is to be appreciated that the present principles are notlimited to Hough transforms and, thus, other line detection transformsand methods can also be used in accordance with the teachings of thepresent principles, while maintaining the spirit of the presentprinciples.

The corner pixel cut-off device 260 cuts off corner pixels. In anembodiment, the corner pixel cut-off device 260 includes a Harris cornerdetector 261 for detecting corner pixels. Of course, other detectors canalso be used in accordance with the teachings of the present principles,while maintaining the spirit of the present principles.

The threshold filter 270 performs a threshold filtering operation to cutoff low intensity pixels (noise). In an embodiment, the threshold filter270 includes a binary mask generator 271 for generating a binary mask.

The pixel counter 280 counts the number of pixels in an image. In anembodiment, the pixel counter 280 is masked based, and counts the pixelsin a mask that have a certain value indicative of rain.

The rain estimator 290 estimates the amount of precipitation over agiven time period. In an embodiment, the rain estimator 290 generates anestimation based on previously calibrated values. In an embodiment, thepreviously calibrated values are stored in the storage device 210. Inanother embodiment, the previously calibrated values can be obtainedfrom another source.

In an embodiment, the rain estimator 290 includes a rain calibrationvalue trainer 291 for adapting the rain calibrated values using one ormore data adaptation methods. Hence, previously calibrated values can berecalibrated over time to improve precision. For example, once othersources of the rainfall amount are available, previous values ofrainfall at a previous time as determined by the present principles canbe compared to the amounts reported by the other sources in order torecalibrate the previous values and/or related thresholds in order toimprove the precision of estimates over time. The preceding and otherdata training approaches can be used in accordance with the teachings ofthe present principles, while maintaining the spirit of the presentprinciples.

The rain indicator 299 provides an indication of the fact that it israining and/or an amount of rain. The rain indicator 299 can involve oneor more of raising alarms, sending messages, creating incidents,creating reports, notifying information systems, turning on lightsand/or varying one or more characteristics of the lights (e.g., coloredlights, with color saturation thereof based on the amount of raindetected, and/or any light, and/or increasing light intensity withincreasing rain), and so forth.

In the embodiment shown in FIG. 2, the elements thereof areinterconnected by a bus 201. However, in other embodiments, other typesof connections can also be used. Moreover, in an embodiment, at leastone of the elements of system 200 is processor-based. Further, while therain calibration value trainer 291 is shown as part of the rainestimator 290, in another embodiment these elements can be implementedas standalone elements. These and other variations of the elements ofsystem 200 are readily determined by one of ordinary skill in the art,given the teachings of the present principles provided herein, whilemaintaining the spirit of the present principles.

FIG. 3 shows an exemplary method 300 for estimating rainfallprecipitation amounts, in accordance with an embodiment of the presentprinciples.

At step 305, store a set of reference images to be used as backgroundreference. In an embodiment, the set of reference images include imageswith no rain, several days of the year, and several times of a day,preferably covering a lot of light conditions. In an embodiment, step305 can be performed by the storage device 210.

At step 310, capture an image of a scene with rain. It is to beappreciated that while step 310 involves one captured image for the sakeof simplicity, step 310 can involve capturing multiple images of thescene with rain, where each of the captured images are processed asdescribed herein. In an embodiment, step 310 can be performed by thecamera 220.

At step 315, select a reference image from the set of reference imagesbased on the light condition of the captured image. In an embodiment,the reference image is selected from the set based upon at least one ofday of year, time of day, and so forth, in order to match the lightcondition of the captured image. In an embodiment, step 315 can beperformed by the light condition based image selector 230.

At step 320, perform an image background subtraction operation. In anembodiment, the image background subtraction operation can be asfollows:C(x,y)−T(x,y)=O(x,y)where C denotes a current captured image, T denotes a template/referenceimage from the set, O denotes an output image with no background, butstill with some “moving objects”, x denotes a first spatial orientation(e.g., x-axis in a two-dimensional image), and y denotes a secondspatial orientation orthogonal with respect to the first spatialorientation (e.g., y-axis in the two-dimensional image). In anembodiment, step 320 can be performed by the image background subtractor240.

At step 325, perform border detection. In an embodiment, step 325 caninvolve one or more of the following: Fourier Transformation; wavelettransformation; border detection; and line detection. In an embodiment,step 325 can include applying a Fourier and/or wavelet transform to thesubtraction image to identify/enhance frequencies which describe thetexture of raindrops. In an embodiment, step 325 can include performingborder detection to detect borders in the subtraction image. In thisway, borders can be excluded from consideration in detecting rain in asubsequent step. The border detection can involve one or more of thefollowing filters/filtering operations: Laplacian; difference ofGaussians; edge detector (e.g., Canny edge detector); Sobel; and soforth. In an embodiment, step 325 can include performing line detectionto detect lines of a certain orientation(s). In an embodiment, the linedetection can involve a linear Hough transform and/or a circular Houghtransform. In an embodiment, step 325 can involve detecting straight andinclined lines in the subtraction image since rain drops show up likevertical or inclined lines in a captured image. In an embodiment, step325 can be performed by the image border detection processor 250.

At step 330, filter out pixels that are parts of corners, not straightlines, from the subtraction image. In an embodiment, a Harris cornerdetector can be used. However, it is to be appreciated that other cornerdetectors can also be used in accordance with the teachings of thepresent principles, while maintaining the spirit of the presentprinciples. In an embodiment, step 330 can be performed by the cornerpixel cut-off device 260.

At step 335, perform a “threshold filtering” operation to cut off lowintensity pixels (noise). In an embodiment, step 335 can includegenerated a binary mask. In an embodiment, a mask value of “0” denotesan empty cell (no rain), and a mask value of “1” denotes a rain pixel.Of course, other mask values and conventions can also be used, whilemaintaining the spirit of the present principles. In an embodiment, step335 can be performed by the threshold filter 270.

At step 340, perform a count of pixels. In an embodiment, a direct countof pixels can be performed (e.g., with mask value=1 in the case when abinary mask is generated at step 335). In another embodiment, anindirect count of pixels can be performed (e.g., counting pixels withmask value of 0 and subtracting these pixels from the overall pixelcount). These and other variations to counting pixels are readilydetermined by one of ordinary skill in the art, while maintaining thespirit of the present principles. In an embodiment, step 340 can beperformed by the pixel counter 280.

At step 345, estimate the amount of rain based on previously calibratedvalues. In an embodiment, the following rules can be used to estimatethe amount of rain. Of course, the present principles are not limited tothe following rules to estimate the amount of rain and, thus, in otherembodiments, other rules can also be used as readily determined by oneof ordinary skill in the art given the teachings of the presentprinciples provided herein, while maintaining the spirit of the presentprinciples. For example, the granularity and precision is arbitrary andmust be pre-defined and pre-calibrated depending upon the desired levelof granularity and precision. In the following rules, N represents thepixel count taken at step 240, and x, y, z, and β represent variousamounts of rain measured in millimeters:

-   -   0<N≦a→represents x millimeters of rain;    -   a<N≦b→represents y millimeters of rain    -   b<N≦c→represents z millimeters of rain    -   c<N≦d→represents β millimeters of rain    -   etc.        Of course, the present principles are not limited to the        preceding rules and, thus, other rules (including other        thresholds) can also be used in accordance with the teachings of        the present principles, while maintaining the spirit of the        present principles. In an embodiment, step 345 can be performed        by the rain estimator 290.

At step 350, provide a user perceptible indication of rainfall. Theindication can include indicating that it's (currently) raining and/orthe amount of rain over a given time period. In an embodiment, step 350can involve one or more of raising alarms, sending messages, creatingincidents, creating reports, notifying information systems, turning onlights and/or varying one or more characteristics of the lights (e.g.,colored lights, with color saturation thereof based on the amount ofrain detected, and/or any light, and/or increasing light intensity withincreasing rain), and so forth. In an embodiment, step 345 can beperformed by the rain indicator 299.

A raindrop has been determined to vary from 0.5 mm to 2.5 mm diameter.When a raindrop is larger than that (e.g., from 2.5 to 4.5 mm), the droptends to divide in to smaller drops, holding the assumption that eachthe raindrop would be limited 0.5-2.5 (mm). It has also been determinedthat the raindrop reaches “Terminal Velocity”, v, as follows:v=200*sqrt(a)where a=the diameter of the raindrop.

Another source shows that the raindrop “average velocity” is around 9 to13 (m/s).

We now provide some exemplary calculations that can be made inaccordance with the present principles. Let us assume an average speedof 10 meters per sec (m/sec). Also, we assume we will be using a regularPAL-M standard camera that grabs 29.7 frames per second (frames/sec),let say 30 frames/sec for the sake of simplicity. Thus, the capturingframe rate is 30 frames/sec. The exposure time for each frame would be1/30 (seconds)=0.03333 seconds. Hence, the raindrop will “walk” throughthe image frame during 0.0333 seconds, where the following apply:d=v/dtwhere d is the displacement within the timeframe

In the example of a PAL-M video capture process, the displacement willbe as follows:d=10 m/s*0.03333 sd=0.33 meters

Thus, each frame will have to segment a line representing a raindrop(s)that blurred the image for 0.33 meters (the blurring aspect is due tothe exposure time and the moving drop). As another example, if theraindrop falls with a slower speed (due to the its reduced mass andsize), e.g., v=5 m/s, then the following applies:d=5 m/s*0.33333 s=0.16 m

By computing the size of the raindrop in the image, one would correlatewith the volume of that raindrop and then with the amount and intensityof rain.

Since it is very difficult to compute the real size of the raindrop,because if can be captured from different distances from the camera,this invention proposes a technique that use machine learning approach(e.g., Convolutional Neural Networks, Deep Learning, Statistical MachineLearning, and so forth) to correlate the amount of pixels detected asrain, by learning from actual measurements made from externalinstruments.

Once that is done, we use a calibration that counts the amount of “rainpixels” (i.e., occurrences of blurring for 0.33 meters). The calibrationis previously calibrated data than can be refined over time to improveprecision.

Regarding camera focus, the camera can be calibrated to focus on distantobjectives in order to capture this kind of “rain drop aspect”.Alternatively, if the camera is calibrated to focus on the closeobjects, the raindrop size and shape must be adapted accordingly in thecalculations.

Hence, in case of still cameras, the pictures must be taken accordingly(around 0.5 s), but the present principles can evolve to deal withdifferent ones—from 0.0001 s to a few seconds (e.g., but not limited to,2 or 3 seconds). For the higher shutter speeds, the raindrop will appearmost like a sphere instead of lines. The drop size calculation must becalculated depending on the speed of the raindrop (for example, usingthe expression v=200*sqrt(a)). If there is too much wind, the camera canuse a tilt feature to move to another direction. In an embodiment, twocameras can be used that are orthogonal with respect to teach other. Theestimation of rain fall per time would be an average of the rainfallestimate one frame. Integrating along the time, we can have accumulationand also perform statistical estimates.

We now describe how a cell phone can be modified or a radio transceivercan be built with this device for communicating this information fromremote locations.

The same computer vision algorithm(s) can be implemented forsmartphones/cell phones. The present principles deal with the different“camera specifications” of different cameras accordingly by calibratingthe calculation parameters (e.g., angular grade, focal distance,resolution, frame rate, exposure time (if still camera), and so forth).These parameters will affect the calculation of the size of a raindropand its velocity. These parameters can also affect the calculation ofthe mass of a raindrop. These parameters can thus be used to estimatethe number of pixels for “each raindrop”, and hence, the overall rainamount in a given time.

Once the rainfall is estimated, one can send this information to a“command center” or “control center”, e.g., by using Short MessageService (SMS), General Packet Radio Service (GPRS), radio communication,and/or using another available computer network connection(s).

In an embodiment, the application can consider this connection layer asa “black box”, and once the device is connected, it can send the data toany server/datacenter.

It is to be appreciated that the present principles can be implementedin various different scenarios. For example, regular surveillance orother repurposed cameras can be used. Also, in-vehicle approaches can beused. Further, such in-vehicle or other “inside” approaches can detectrain amount based on a glass plate such as a window in the vehicle orother item (e.g., house). Additionally, a webcam can be placed by awindow or other location. These and other implementations of the presentprinciples are readily determined by one of ordinary skill in the artgiven the teachings of the present principles provided herein, whilemaintaining the spirit of the present principles.

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be executed substantially concurrently, or the blocks maysometimes be executed in the reverse order, depending upon thefunctionality involved. It will also be noted that each block of theblock diagrams and/or flowchart illustration, and combinations of blocksin the block diagrams and/or flowchart illustration, can be implementedby special purpose hardware-based systems that perform the specifiedfunctions or acts or carry out combinations of special purpose hardwareand computer instructions.

Reference in the specification to “one embodiment” or “an embodiment” ofthe present principles, as well as other variations thereof, means thata particular feature, structure, characteristic, and so forth describedin connection with the embodiment is included in at least one embodimentof the present principles. Thus, the appearances of the phrase “in oneembodiment” or “in an embodiment”, as well any other variations,appearing in various places throughout the specification are notnecessarily all referring to the same embodiment.

It is to be appreciated that the use of any of the following “/”,“and/or”, and “at least one of”, for example, in the cases of “A/B”, “Aand/or B” and “at least one of A and B”, is intended to encompass theselection of the first listed option (A) only, or the selection of thesecond listed option (B) only, or the selection of both options (A andB). As a further example, in the cases of “A, B, and/or C” and “at leastone of A, B, and C”, such phrasing is intended to encompass theselection of the first listed option (A) only, or the selection of thesecond listed option (B) only, or the selection of the third listedoption (C) only, or the selection of the first and the second listedoptions (A and B) only, or the selection of the first and third listedoptions (A and C) only, or the selection of the second and third listedoptions (B and C) only, or the selection of all three options (A and Band C). This may be extended, as readily apparent by one of ordinaryskill in this and related arts, for as many items listed.

Having described preferred embodiments of a system and method (which areintended to be illustrative and not limiting), it is noted thatmodifications and variations can be made by persons skilled in the artin light of the above teachings. It is therefore to be understood thatchanges may be made in the particular embodiments disclosed which arewithin the scope of the invention as outlined by the appended claims.Having thus described aspects of the invention, with the details andparticularity required by the patent laws, what is claimed and desiredprotected by Letters Patent is set forth in the appended claims.

What is claimed is:
 1. A system, comprising: memory for storing a set ofreference images without rain and spanning a plurality of differentlight conditions; a camera for capturing an image of a scene with rain;and a processor for selecting a reference image from the set ofreference images based on the light condition of the captured image,performing an arithmetic subtraction image processing operation betweenthe captured image and the reference image to generate a subtractionimage, cutting off corner pixels in the subtraction image, andestimating an amount of rain in the subtraction image based onpreviously calibrated values, wherein the previously calibrated valuesinclude actual measurements of rainfall.
 2. The system of claim 1,wherein the processor performs image border detection processing on thesubtraction image to detect the rain and generates a binary maskresponsive to a result of the subtraction image processing operation,the binary mask having a first pixel value indicative of an absence ofrain and having a second pixel value indicative of a presence of rain,and wherein the processor performs a direct count of pixels having rainby counting a total number of occurrences of the second pixel value, andgenerates an estimate of the amount of rain responsive to the directcount of pixels.
 3. The system of claim 1, wherein the set of referenceimages is captured at least one day prior to capturing the image of thescene with rain.
 4. The system of claim 1, wherein the processor obtainsthe set of reference images from a remote source with respect to thecamera.
 5. The system of claim 1, wherein the reference image isselected from the set of reference images based on the light conditionof the captured image using a time of day as a selection basis.
 6. Thesystem of claim 1, wherein the reference image is selected from the setof reference images based on the light condition of the captured imageusing a day of the year as a selection basis.
 7. The system of claim 1,wherein the arithmetic subtraction image processing operation comprisesperforming:C(x,y)−T(x,y)=O(x,y), where C denotes the captured image, T denotes thereference image, O denotes the subtraction image without a backgroundand with at least one moving object, x denotes a first spatialorientation, and y denotes a second spatial orientation orthogonal withrespect to the first spatial orientation.
 8. The system of claim 1,wherein a predetermined granularity and precision are set for at leastone rain estimate.
 9. The system of claim 1, wherein estimating theamount of rain includes a numerical value of rainfall displayed on adisplay device.
 10. The system of claim 1, wherein the processor isfurther configured to recalibrate the previously calibrated values bycomparing the previously calibrated values and measurements obtained byexternal instruments.
 11. A computer program product for estimatingrainfall precipitation, the computer program product comprising acomputer readable storage medium having program instructions embodiedtherewith, the program instructions executable by a computer to causethe computer to perform a method comprising: storing a set of referenceimages without rain and spanning a plurality of different lightconditions; capturing, using a camera, an image of a scene with rain;selecting a reference image from the set of reference images based onthe light condition of the captured image; performing an arithmeticsubtraction image processing operation between the captured image andthe reference image to generate a subtraction image; cutting off cornerpixels in the subtraction image; and estimating an amount of rain in thesubtraction image based on previously calibrated values, wherein thepreviously calibrated values include actual measurements of rainfall.12. The computer program product of claim 11, wherein the set ofreference images is captured at least one day prior to capturing theimage of the scene with rain.
 13. The computer program product of claim11, further comprising obtaining the set of reference images from aremote source with respect to the camera.
 14. The computer programproduct of claim 11, wherein the reference image is selected from theset of reference images based on the light condition of the capturedimage using a time of day as a selection basis.
 15. The computer programproduct of claim 11, wherein the reference image is selected from theset of reference images based on the light condition of the capturedimage using a day of the year as a selection basis.
 16. The computerprogram product of claim 11, wherein the arithmetic subtraction imageprocessing operation comprises performing:C(x,y)−T(x,y)=O(x,y), where C denotes the captured image, T denotes thereference image, O denotes the subtraction image without a backgroundand with at least one moving object, x denotes a first spatialorientation, and y denotes a second spatial orientation orthogonal withrespect to the first spatial orientation.
 17. The computer programproduct of claim 11, wherein said step of estimating the amount of raincomprises setting a predetermined granularity and precision for at leastone rain estimate.
 18. The computer program product of claim 11, whereinestimating the amount of rain includes a numerical value of rainfalldisplayed on a display device.
 19. The computer program product of claim11, wherein the set of reference images spanning the plurality ofdifferent light conditions includes images obtained from a surfaceregion upon which rain is detected.
 20. The computer program product ofclaim 11, further comprising recalibrating the previously calibratedvalues by comparing the previously calibrated values and measurementsobtained by external instruments.